package com.fjwt.gz.service.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fjwt.gz.db.dto.MchGroupDTO;
import com.fjwt.gz.db.entity.MchGroupEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fjwt.gz.db.dto.PointDTO;
import com.fjwt.gz.db.vo.MchGroupVO;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 商圈表 Mapper 接口
 * </p>
 *
 * @author shiyonghao
 * @since 2025-04-09
 */
public interface MchGroupMapper extends BaseMapper<MchGroupEntity> {

    /**
     * 查询附近商圈列表
     * @param iPage
     * @param location
     * @param radius
     * @param agentNo
     * @param agentNo2
     * @return
     */
    IPage<MchGroupVO> findNearGroupList(IPage iPage, @Param("location") PointDTO location, @Param("radius") Integer radius, @Param("agentNo") String agentNo, @Param("agentNo2") String agentNo2);

    /**
     * 添加商圈
     * @param mchGroupEntity
     * @return
     */
    int add(MchGroupEntity mchGroupEntity);

    /**
     * 修改商圈
     * @param mchGroupEntity
     * @return
     */
    int updateByGroupNo(MchGroupEntity mchGroupEntity);



}
